<!-- 全市统览 -->
<template>
  <div>
    <BreadCrumb/>
    <div class="cityOverview">
      <div class="left-view">
        <LeftView :statAllData="statAllData" />
      </div>
      <div class="center">
        <CenterView :statAllData="statAllData" />
      </div>
      <div class="right-view">
        <RightView :statAllData="statAllData" />
      </div>
      <div class="bottom">
        <BottomView :statAllData="statAllData" />
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { ref, inject, onMounted } from 'vue'
import selfMessageIndex from '@/components/self-message/selfMessageIndex'
import BreadCrumb from '@/components/breadcrumb/index.vue';
import CenterView from './components/centerView/index.vue' // 中间面板
import LeftView from './components/leftView/index.vue' // 左侧面板
import RightView from './components/rightView/index.vue' // 右侧面板
import BottomView from './components/bottomView/index.vue' // 右侧面板
const httpApi: any = inject('$http')

// 统计相关信息
const statAllData = ref({}) as any
// 获取攻拔项目模块数据
function getStatAll() {
  httpApi.pageHomeApi
    .statAll({})
    .then((res: any) => {
      if (res.success) {
        statAllData.value = res.body || {}
      } else {
        selfMessageIndex.error(res.message)
      }
    })
    .catch((err: any) => {
      console.error(err || '系统异常')
      selfMessageIndex.error('系统异常')
    })
}
getStatAll()
</script>
<style lang="scss" scoped>
.cityOverview {
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 36vh * $Bh 64vw * $Bw 64vh * $Bh;

  .left-view {
    width: 840vw * $Bw;
    height: 100%;
    color: white;
    // background-color: #0C2357;
  }

  .right-view {
    width: 840vw * $Bw;
    height: 100%;
    color: white;
    // background-color: #0C2357;
  }
  .center {
    flex: 1;
    height: 100%;
    margin: 0 56vw * $Bw;
    // background-color: #162c5e9a;
  }
  .bottom {
    width: 100%;
    height: 50vw * $Bw;
  }
}
</style>
